﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Microfinance_Management
{
    public partial class Administractor : Form
    {
        public Administractor()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            StringBuilder id = new StringBuilder(20);
            StringBuilder address = new StringBuilder(50);
            StringBuilder tel = new StringBuilder(20);
            StringBuilder name = new StringBuilder(20);
            MySQL.startEmployInfo();
            listView1.View = View.Details;
            int i = 0;
            while (MySQL.DisplayEmployInfo(id, name, address, tel))
            {
                listView1.Items.Add(id.ToString());
                listView1.Items[i].SubItems.Add(name.ToString());
                listView1.Items[i].SubItems.Add(address.ToString());
                listView1.Items[i].SubItems.Add(tel.ToString());
                ++i;
            }

        }

        private void button3_Click(object sender, EventArgs e)
        {
            string id = listView1.SelectedItems[0].Text;
            Info inf = new Info(id);
            inf.ShowDialog();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            employ_info empinfo = new employ_info("");
            empinfo.ShowDialog();
        }



  

        

    }
}
